loadScript('https://app.77sy.com.cn/static/sdk/77sy_sdk.min.js?t='+new Date().getTime(), function(err) {
    if (err) {
        console.error('加载出错');
    } else {
        window.addEventListener("message", function(event) {
            switch (event.data.cmd) {
                case "qqsy_jssdk_finished":
                {
                    console.log("收到77sy_sdk加载完毕通知!!!!!");

                    //在此处执行游戏自身的业务逻辑JS
                    // 登录
                    qiqisy_login();
                    break
                }
            }
        }, false);

        console.log("是否打开游戏：",open_game);
        if(!open_game){
            open_game = 1;
        }
    }
});

//登录
function qiqisy_login(){
    window.QQSY_SDK.getUserInfo(function(data) {
        console.log(data);
        data.cid = cid;
        data.gid = gid;
        faXingLogin(queryParams);
    })

}

function getQueryParams() {
    var urlParams = new URLSearchParams(window.location.search);
    var params = {};
    for (var param of urlParams.entries()) {
        params[param[0]] = param[1];
    }
    return params;
}



function Qiqisy_creterole(data){
    $.post(feihuo_creteroleUlr,data,function(info) {
        console.log("飞火创建角色结果:",info);
    });
}



function Qiqisy_pay(data){
    console.log("qiqisy：",data);

    window.QQSY_SDK.pay(data);
}
